<template>
  <div>
    水电费第三方
  </div>
</template>
<script>
import AMap from "vue-amap";
Vue.use(AMap);
AMap.initAMapApiLoader({
  key: "8a40e3b40c7456c5a5b31c1dd72a606c",
  plugin: [
    "AMap.Autocomplete",
    "AMap.PlaceSearch",
    "AMap.Scale",
    "AMap.OverView",
    "AMap.ToolBar",
    "AMap.MapType",
    "AMap.PolyEditor",
    "AMap.CircleEditor"
  ]
});

import Vue from "vue";
import { Script } from "vm";
import { vehicleMap } from "@/api/vehiclemap";
export default {
  data() {
    return {
      vehicleCodes: "595d6d91ca694b58a9fd23e04df0b494",
      zoom: 12,
      center: [118.234920, 35.116317],
      arrjw:[],
      lines: [
        {
          path: [[116.39, 39.91, 116.37, 39.91]],
          strokeDasharray: [10, 10],
          strokeColor: "#FF33FF", //线颜色
          strokeOpacity: 1, //线透明度
          strokeWeight: 3, //线宽
          strokeStyle: "solid", //线样式
          events: {
            click: () => {
              alert("click");
            }
          }
        }
      ]
    };
  },
  created() {},
  methods: {
    mapquery() {
      vehicleMap(this.vehicleCodes).then(response => {
        response.data.map(item => {
          this.arrjw.push(Number(item.longitude));
          this.arrjw.push(Number(item.latitude));
        });
        this.center = this.arrjw;
      });
    }
  }
};
</script>

<style>
.amap-page-container {
  height: 800px;
}
.grid-content {
  border-bottom: 1px solid rgb(109, 104, 104);
}
.grid-content p {
  color: rgb(109, 104, 104);
  text-align: center;
}
.el-button {
  position: fixed;
  top: 100px;
  left: 100px;
  z-index: 9;
  height: 48px;
  width: 48px;
}
</style>